﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Pipo.DateExtensions {
    public static class DateGet {

        public  static DateTime PreviousEndOfMonthFromThisDate(DateTime dateTime){
            return dateTime.AddDays( - dateTime.Day);
            
      }

        public static DateTime BeginningoftheMonth(DateTime dateTime) {
        return new DateTime(dateTime.Year, dateTime.Month, 1);
            }

        public static DateTime EndofMOnth(DateTime todate){
            return new DateTime(todate.Year, todate.Month, DateTime.DaysInMonth(todate.Year, todate.Month));
        }
    }
    }
